package com.hmdp.mapper;

import com.hmdp.entity.Follow;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 虎哥
 * @since 2021-12-22
 */
public interface FollowMapper extends BaseMapper<Follow> {

    /**
     * 关注用户
     * @param follow
     */
    boolean focusUser(Follow follow);

    /**
     * 取关用户
     * @param follow
     */
    boolean unfocusUser(Follow follow);

    /**
     * 判断是否关注用户
     * @param follow
     * @return
     */
    Integer isFocusONUser(Follow follow);

    /**
     * 查询出所有的粉丝id
     * @param userId
     * @return
     */
    List<Integer> selectAllFollow(Long userId);
}
